package com.rain.rain.retrofit.http.test

import com.rain.rain.retrofit.http.base.BaseRepository
import com.rain.rain.retrofit.http.base.Result

/**
 *@Author: Rain
 *@Date: 2021/9/29 9:50
 *@Description: 登录相关的数据仓库
 */
object LoginRepository : BaseRepository() {
    private val api =
        createService<KJSLRetrofitClient, Login2Service>(KJSLRetrofitClient, Login2Service.BASE_URL)

    suspend fun login(smsVerifyCode: String, username: String): Result<LoginUserData> =
        executeResponse(api.loginAsync(smsVerifyCode, username))

}